package com.googlecode.jsitemap;

/**
 * @author Denis Migol
 * 
 */
public abstract class BuildParamsBase<P extends BuildParamsBase<?>> {
	private int maxUrls = Builder.MAX_URLS;
	private int maxSize = Builder.MAX_SIZE;
	private boolean modifyEntries;

	@SuppressWarnings("unchecked")
	public P setMaxUrls(final int maxUrls) {
		this.maxUrls = maxUrls;
		return (P) this;
	}

	public int getMaxUrls() {
		return maxUrls;
	}

	@SuppressWarnings("unchecked")
	public P setMaxSize(final int maxSize) {
		this.maxSize = maxSize;
		return (P) this;
	}

	public int getMaxSize() {
		return maxSize;
	}

	@SuppressWarnings("unchecked")
	public P setModifyEntries(final boolean modifyEntries) {
		this.modifyEntries = modifyEntries;
		return (P) this;
	}

	public boolean isModifyEntries() {
		return modifyEntries;
	}
}
